home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / system / ffg202.zip / DEMO_BAT.ZIP / DATEFLAG.BAT < prev    next >
DOS Batch File  |  1995-04-01  |  1KB  |  33 lines

  1. @echo off
  2. echo Here we create a 0-byte file with today's date as its name which could be
  3. echo used by other programs to check today's date.
  4. echo.
  5. ::-----------------------------------------------------------------------
  6. ::
  7. :: Note that double '%%' are used with /e option because we are doing this in
  8. :: a batch file:
  9. ::
  10. ::echo on
  11. rem>$$$$$$$$.&&&
  12. ffg .\$$$$$$$$.&&& /r /q /1 /dt "/e!ren %%n %%d.tdy"
  13. ::-----------------------------------------------------------------------
  14. echo.
  15. echo Press a key to see the file...
  16. pause>nul
  17. echo.
  18. echo The file has today's date as the first name and TDY as the extension:
  19. echo.
  20. ffg .\*.tdy /r /qf /dt
  21. ::-----------------------------------------------------------------------
  22. echo.
  23. echo Next you will be given a chance to delete the file.
  24. call presskey
  25. echo.
  26. ffg .\?[,?]-?[,?]-??.tdy /r /q /dt "/edel %%N"
  27. ::-----------------------------------------------------------------------
  28. cls
  29. echo Done.  Press any key for next demonstration...
  30. pause>nul
  31. :: Since this is a demo the file will be deleted
  32. ffg .\*.tdy /r /q /dt "/e!del %%N
  33.